# DiaGramma for Excel ver. 1.0.2 **DiaGramma for Excel** is an Excel add-in for exporting Illustrator-editable SVG pollen diagrams directly from selected data ranges in Excel. It is designed for palynological and palaeoecological datasets, especially large pollen diagrams with many samples and taxa. The output SVG is intended to be opened and edited in Adobe Illustrator or similar vector-graphics software. --- ## Version Ver. 1.0.2 (first beta release) --- ## Main features - Exports pollen diagrams from a selected range in Excel - Outputs SVG files that can be edited in Adobe Illustrator - Supports five drawing styles: - Area Only - Bars Only - Line Only - Area + Bars - Line + Points - Uses real depth values for the vertical scale - Supports separator rows to split graph segments - Keeps each taxon in a separate SVG group for easy editing - Saves the SVG file in the same folder as the source workbook - Works as an Excel `.xlam` add-in with a custom Ribbon tab --- ## Installation 1. Save the add-in file: `DiaGramma_for_Excel.xlam` in a folder with an English/alphanumeric path. Recommended example: `/Users/yourname/Documents/DiaGramma/` 2. Open Excel. 3. Open: `Tools > Excel Add-ins...` 4. Click `Browse...` 5. Select: `DiaGramma_for_Excel.xlam` 6. Make sure the DiaGramma add-in is checked in the add-ins list. 7. A new Ribbon tab named **Pollen diagram** should appear. --- ## Important note about folder names In the current beta version, paths containing Japanese or other non-ASCII characters may cause errors in Excel VBA, especially on Mac Excel. If you see an error such as “Invalid path or file name”, please move both the Excel workbook and the add-in to a folder with an English/alphanumeric path, for example: `/Users/yourname/Documents/DiaGramma/` This is a known issue and may be improved in a future version. --- ## Preparing the data Select the range you want to export before clicking a DiaGramma button. The expected data format is: - Column 1: composite depth - Columns 2 and onwards: taxon values - The first row may contain taxon names - Rows where all taxon values are zero are treated as separator rows Example: | Composite depth | Taxon A | Taxon B | Taxon C | |---|---:|---:|---:| | 0.10 | 12 | 4 | 0 | | 0.20 | 15 | 3 | 1 | | 0.30 | 0 | 0 | 0 | | 0.40 | 8 | 2 | 5 | In this example, the row at depth 0.30 is treated as a separator row. --- ## Header rows and partial-range export DiaGramma for Excel can export either: 1. a range that includes the header row, or 2. a data-only range selected from the middle of a worksheet. If the top-left cell of the selected range is not numeric, the first row of the selection is treated as a header row. If the top-left cell is numeric, the selection is treated as data only. In this case, DiaGramma searches upward in each taxon column and uses the first non-blank, non-numeric text cell as the taxon name. This makes it possible to export only part of a long pollen diagram while still keeping the correct taxon names. --- ## Exporting an SVG 1. Open the workbook containing the pollen data. 2. Select the range to export. 3. Open the **Pollen diagram** Ribbon tab. 4. Click one of the drawing-style buttons. 5. Enter a file name when prompted. 6. The SVG file will be saved in the same folder as the source workbook. If the file name does not include `.svg`, the extension will be added automatically. --- ## Drawing styles ### Area Only The **Area Only** style exports a filled area graph for each taxon. - The area is filled in green - No horizontal bars are drawn - Each taxon is exported as one SVG path - Segments separated by separator rows are stored as multiple closed subpaths within the same path --- ### Bars Only The **Bars Only** style exports horizontal bars only. - Zero values are skipped - Bars are drawn as line segments, not rectangles - The line cap is set to `butt`, so the bar ends do not protrude - The initial bar stroke is slightly thicker than in the Area + Bars style - In Illustrator, the bar thickness can be changed by changing the stroke width, without changing the bar length --- ### Line Only The **Line Only** style exports a line graph for each taxon. - Separator rows split the graph into separate open subpaths - Line joins and line caps are rounded - No filled area, bars, or points are drawn --- ### Area + Bars The **Area + Bars** style is the standard DiaGramma style. - Each taxon has an area/polygon path - Horizontal bars are drawn as a separate path - Zero-value bars are skipped - Separator rows split the graph into multiple subpaths - The area path is not filled by default - The bars use `stroke-linecap="butt"` --- ### Line + Points The **Line + Points** style exports a line graph with data-point markers. - Points are real SVG `` objects - Points are grouped by taxon - Zero values do not receive point markers - The circles can be selected, recoloured, resized, or edited easily in Illustrator --- ## Editing the SVG in Illustrator The SVG output is designed to remain editable after export. In Illustrator, you can: - Select and edit each taxon separately - Change stroke width, colour, or fill - Edit bars independently from area paths - Resize point markers in the Line + Points style - Reorganise or relabel graphical elements as needed The SVG structure is intentionally simple and Illustrator-friendly rather than being optimised only for screen display. --- ## Notes on large datasets DiaGramma for Excel is intended for large pollen datasets. The vertical spacing reflects the actual depth scale. The software does not attempt to force the diagram onto a single page. Final scaling, page layout, and publication adjustments should be done in Illustrator or another vector graphics editor after export. --- ## Current limitations This is a first beta release. Please note the following limitations: - Tested mainly on Mac Excel - Non-ASCII characters in file or folder paths may cause errors - Save dialogs are not used in this beta version because they can be unstable in Mac Excel - The SVG is saved in the same folder as the source workbook - Custom Ribbon icons are not yet included - All Ribbon buttons currently use a temporary built-in Office icon --- ## Recommended use for beta testing For the first beta version, it is recommended to: - Keep the workbook and add-in in an English/alphanumeric folder path - Test the add-in with copied data rather than irreplaceable original files - Check the exported SVG in Illustrator before using it for final figures - Report any errors together with: - Excel version - operating system - workbook path - selected data range - drawing style used --- ## Credits Author: Takeshi Nakagawa Research Centre for Palaeoclimatology, Ritsumeikan University ChatGPT (OpenAI) played a decisive role in supporting the development of this software. --- ## Licence and distribution This is an initial beta version prepared for testing and feedback among research collaborators. --- ## Contact For questions, feedback, or bug reports, please contact the author.